/* 
 * File:   InformationPanel.cpp
 * Author: amouro-m
 * 
 * Created on 31 mai 2010, 03:11
 */

#include "InformationPanel.h"
#include "Action.h"

#include <QVBoxLayout>

InformationPanel::InformationPanel(QWidget* parent):
QWidget(parent)
{
    _qLabel= new QLabel("Actions", parent);
    _qButton = new QPushButton("Executer", parent);
    _qListWidget = new QListWidget(parent);

    QVBoxLayout* layout = new QVBoxLayout;
    layout->addWidget(_qLabel);
    layout->addWidget(_qListWidget);
    layout->addWidget(_qButton);
    setLayout(layout);
}

InformationPanel::~InformationPanel() {}

void
InformationPanel::add_computable(Computable* computable)
{
    _qListWidget->addItem(new Action(computable, _qListWidget));
}
